import request from '@/utils/request'

export function getQuestionList(query) {
  return request({
    url: '/knowledge/question/getList',
    method: 'post',
    data: query
  })
}

export function getQuestionDetail(id) {
  return request({
    url: '/knowledge/question/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByQuestionID(id) {
  return request({
    url: '/knowledge/question/change-status',
    method: 'post',
    data: id
  })
}

export function saveQuestion(formdata) {
  return request({
    url: '/knowledge/question/save',
    method: 'post',
    data: formdata
  })
}

export function deleteQuestionByID(id) {
  return request({
    url: '/knowledge/question/delete',
    method: 'post',
    data: id
  })
}
export function removeQuestionByID(id) {
  return request({
    url: '/knowledge/question/remove',
    method: 'post',
    data: id
  })
}

export function fetchQuestionAvabile() {
  return request({
    url: '/knowledge/question/getAvailable',
    method: 'post'
  })
}
